package com.navi.loaddata.core.gpEntity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "mpp_layout_d", schema = "dm")
public class MppLayoutD {

    private int layoutKey;
    private String unqSeqId;
    private Timestamp etlTimestamp;
    private String etlEventNode;
    private String etlEventName;
    private String etlEvtSeqId;
    private String layoutId;
    private String layoutDsc;
    private String posDsc;
    private Integer totalCnt;
    private String evtCate;
    private String evtUser;
    private Timestamp evtTimestamp;
    private String evtNote;
    private String validFlg;

    @Id
    @Column(name = "layout_key")
    public int getLayoutKey() {
        return layoutKey;
    }

    public void setLayoutKey(int layoutKey) {
        this.layoutKey = layoutKey;
    }

    @Basic
    @Column(name = "unq_seq_id")
    public String getUnqSeqId() {
        return unqSeqId;
    }

    public void setUnqSeqId(String unqSeqId) {
        this.unqSeqId = unqSeqId;
    }

    @Basic
    @Column(name = "etl_timestamp")
    public Timestamp getEtlTimestamp() {
        return etlTimestamp;
    }

    public void setEtlTimestamp(Timestamp etlTimestamp) {
        this.etlTimestamp = etlTimestamp;
    }

    @Basic
    @Column(name = "etl_event_node")
    public String getEtlEventNode() {
        return etlEventNode;
    }

    public void setEtlEventNode(String etlEventNode) {
        this.etlEventNode = etlEventNode;
    }

    @Basic
    @Column(name = "etl_event_name")
    public String getEtlEventName() {
        return etlEventName;
    }

    public void setEtlEventName(String etlEventName) {
        this.etlEventName = etlEventName;
    }

    @Basic
    @Column(name = "etl_evt_seq_id")
    public String getEtlEvtSeqId() {
        return etlEvtSeqId;
    }

    public void setEtlEvtSeqId(String etlEvtSeqId) {
        this.etlEvtSeqId = etlEvtSeqId;
    }

    @Basic
    @Column(name = "layout_id")
    public String getLayoutId() {
        return layoutId;
    }

    public void setLayoutId(String layoutId) {
        this.layoutId = layoutId;
    }

    @Basic
    @Column(name = "layout_dsc")
    public String getLayoutDsc() {
        return layoutDsc;
    }

    public void setLayoutDsc(String layoutDsc) {
        this.layoutDsc = layoutDsc;
    }

    @Basic
    @Column(name = "pos_dsc")
    public String getPosDsc() {
        return posDsc;
    }

    public void setPosDsc(String posDsc) {
        this.posDsc = posDsc;
    }

    @Basic
    @Column(name = "total_cnt")
    public Integer getTotalCnt() {
        return totalCnt;
    }

    public void setTotalCnt(Integer totalCnt) {
        this.totalCnt = totalCnt;
    }

    @Basic
    @Column(name = "evt_cate")
    public String getEvtCate() {
        return evtCate;
    }

    public void setEvtCate(String evtCate) {
        this.evtCate = evtCate;
    }

    @Basic
    @Column(name = "evt_user")
    public String getEvtUser() {
        return evtUser;
    }

    public void setEvtUser(String evtUser) {
        this.evtUser = evtUser;
    }

    @Basic
    @Column(name = "evt_timestamp")
    public Timestamp getEvtTimestamp() {
        return evtTimestamp;
    }

    public void setEvtTimestamp(Timestamp evtTimestamp) {
        this.evtTimestamp = evtTimestamp;
    }

    @Basic
    @Column(name = "evt_note")
    public String getEvtNote() {
        return evtNote;
    }

    public void setEvtNote(String evtNote) {
        this.evtNote = evtNote;
    }
    @Basic
    @Column(name = "valid_flg")
    public String getValidFlg() {
        return validFlg;
    }

    public void setValidFlg(String validFlg) {
        this.validFlg = validFlg;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MppLayoutD that = (MppLayoutD) o;
        return layoutKey == that.layoutKey &&
                Objects.equals(unqSeqId, that.unqSeqId) &&
                Objects.equals(etlTimestamp, that.etlTimestamp) &&
                Objects.equals(etlEventNode, that.etlEventNode) &&
                Objects.equals(etlEventName, that.etlEventName) &&
                Objects.equals(etlEvtSeqId, that.etlEvtSeqId) &&
                Objects.equals(layoutId, that.layoutId) &&
                Objects.equals(layoutDsc, that.layoutDsc) &&
                Objects.equals(posDsc, that.posDsc) &&
                Objects.equals(totalCnt, that.totalCnt) &&
                Objects.equals(evtCate, that.evtCate) &&
                Objects.equals(evtUser, that.evtUser) &&
                Objects.equals(evtTimestamp, that.evtTimestamp) &&
                Objects.equals(evtNote, that.evtNote);
    }

    @Override
    public int hashCode() {

        return Objects.hash(layoutKey, unqSeqId, etlTimestamp, etlEventNode, etlEventName, etlEvtSeqId, layoutId, layoutDsc, posDsc, totalCnt, evtCate, evtUser, evtTimestamp, evtNote);
    }
}
